package jroguelike.main;

public class Gametime {
	public final long value;

	public Gametime(long value) {
		this.value = value;
	}

	public Gametime add(long value) {
		return new Gametime(this.value + value);
	}

	public Gametime add(Gametime other) {
		return new Gametime(this.value + other.value);
	}

	public int millis() {
		return (int) value % 1000;
	}

	public int seconds() {
		return (int) (value / 1000) % 60;
	}

	public int minutes() {
		return (int) (value / 1000 / 60) % 60;
	}

	public int hours() {
		return (int) (value / 1000 / 60 / 60) % 24;
	}

	public long days() {
		return (value / 1000 / 60 / 60 / 60);
	}
}
